package net.xiduth.game.player.dialogues.impl;

import net.xiduth.game.player.dialogues.Dialogue;

/**
 * 
 * @author Jae <jae@xiduth.com>
 * 
 * @since <Oct 18, 2013>
 *
 */
public class Web_links extends Dialogue {

	@Override
	public void start() {
		stage = 1;
		if (stage == 1) {
			sendOptionsDialogue("Where would you like to go?",
					"Highscores.",
					"Donate.",
					"Forums.",
					"Vote.");
			stage = 1;
	}
	}

	public void run(int interfaceId, int componentId) {
		if (stage == 1) {
			if (componentId == OPTION_1) {
				player.getPackets().sendOpenURL("http://xiduth.net/highscores");
				stage = 2;
			}
			if (componentId == OPTION_2) {	
				player.getPackets().sendOpenURL("http://xiduth.net/new/donate/index.php");
				stage = 2;
				}
			if (componentId == OPTION_3) {
				player.getPackets().sendOpenURL("http://forum.xiduth.com");
				stage = 2;
			}
			if (componentId == OPTION_4) {
				player.getPackets().sendOpenURL("http://xiduth.net/vote");
				stage = 2;
			}
		}
		if (stage == 2) {
			end();
			player.getInterfaceManager().closeChatBoxInterface();
		}
	}
	
	@Override
	public void finish() {

	}

}